package com.zsrt.java.day20161223.zzm.demo02;

import java.util.Scanner;

import org.junit.Test;

public class TwoTest {

	@Test
	public void swaft(){
		Scanner sc = new Scanner(System.in);
		System.out.println("请输入第一个数:");
		int a = sc.nextInt();
		System.out.println("请输入第二个数:");
		int b = sc.nextInt();
		sc.close();
		System.out.println("第一个数为:a="+a);
		System.out.println("第二个数为:b="+b);
		if(a>b){
			int c = a;
			    a = b;
			    b = c;
			System.out.println("交换位置后......");
			System.out.println("第一个数为:a="+a);
			System.out.println("第二个数为:b="+b);
		}
	}
}
